Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(page): Add toggle for full width page view #874

Merged
merged 5 commits into from
Sep 15, 2023
Merged

Conversation

mejo-
Copy link
Member

@mejo- mejo- commented Sep 12, 2023

The full width mode is a per-page user setting and is persisted in browser storage. It will not persist across devices.

Fixes: #242

Screenshots

Nomal Full width
grafik grafik

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation is not required

@cypress
Copy link

cypress bot commented Sep 12, 2023

5 failed and 4 flaky tests on run #1150 ↗︎

5 234 0 0 Flakiness 4
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

feat(page): Add toggle for full width page view
Project: Collectives Commit: 244fda6e98
Status: Failed Duration: 37:16 💡
Started: Sep 13, 2023 2:53 PM Ended: Sep 13, 2023 3:31 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

Copy link
Member

@nimishavijay nimishavijay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nice! Notes from the design review:

  • Move "Last changed by" item to the top
  • Add divider before and after "Full width" and "Show outline"
Jane Doe an hour ago
---
Full width
Show outline 
---
Add template for subpages
Show in Files
Delete page
  • Bug: if full-width is toggled, the action menu does not close, but 3 dot menu moves --> to be fixed in component
    • Temporary solution: Always show the group of 3 buttons (Edit, 3dot menu, sidebar toggle) at the right end of the page
    • Group of buttons should have equal top and right margin
    • Nice-to-have: buttons are aligned with top right header buttons (avatar, notifications, contact search, universal search)

@mejo- mejo- force-pushed the feat/full_width branch 3 times, most recently from 27f662b to c4ebae3 Compare September 13, 2023 11:01
@mejo-
Copy link
Member Author

mejo- commented Sep 13, 2023

@nimishavijay I addressed all the topics we discussed in the call, please see the updated screenshots ☺️

@mejo- mejo- requested a review from nimishavijay September 13, 2023 11:05
Copy link
Member

@nimishavijay nimishavijay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super! :)

@jancborchardt
Copy link
Member

@KaeTuuN @theron29 since you commented in the issue this fixes, would this "per-page per-device" setting work for you?

@mejo- I’m leaning a bit towards that the layout should be a per-device setting across pages, since per the issue it seems it’s mostly people with large screens, and that doesn’t change across pages.

@juliusknorr
Copy link
Member

@mejo- I’m leaning a bit towards that the layout should be a per-device setting across pages, since per the issue it seems it’s mostly people with large screens, and that doesn’t change across pages.

From my perspective it is more the actual page content that would influence if you want to use the full width or regular width mode, e.g. for pages with long text you might prefer a limited width for readability while for pages with larger tables or other content a full width is more suitable. I think mid term we should also adapt this in text itself, so having it per document could also be stored in the file rather than per user.

Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a quick look at the code. Looks good all in all.

Just one minor thing that needs to be addressed before the merge.

cypress/e2e/pages.spec.js Outdated Show resolved Hide resolved
@theron29
Copy link

@jancborchardt Yes, this actually looks very good and promising 👍

@mejo-
Copy link
Member Author

mejo- commented Sep 13, 2023

Failing Cyress tests are related, will look into it next week.

@KaeTuuN
Copy link

KaeTuuN commented Sep 14, 2023

@jancborchardt Thanks for mentioning me!

First: Thanks for developing! (@mejo- )
Second:

  1. Will this Setting also affect the Edit Mode? (I hope so :-) )
  2. Won't it be possible to move the Option directly to the top? Reason: Most complains were about table views and now you have to do more clicks for switching if you just want to view a table on full width and then go back to "normal" mode.

Greetings,
Kae

@max-nextcloud
Copy link
Collaborator

2. Won't it be possible to move the Option directly to the top?

I don't quite understand where you would put it. Could you edit one of the screenshots above with an indication where you would expect to find this feature?

@KaeTuuN
Copy link

KaeTuuN commented Sep 14, 2023

I'm on my Smartphone atm.
I just want to put it as an Icon next to the edit Button.
Expand Button might look similar to this: https://cdn4.iconfinder.com/data/icons/ui-controls-editor/32/interface-controls-horizontal-expand-512.png
And the shrink Button might look similar to this: https://cdn.onlinewebfonts.com/svg/img_278259.png
The Icon changes in case of switching width.

Greetings,
Kae

Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the additional explanation @juliushaertl, then looks good design-wise. :)

And the setting is good in the menu, moving it out would make it too present compared to how important it is.

@mejo-
Copy link
Member Author

mejo- commented Sep 14, 2023

1. Will this Setting also affect the Edit Mode? (I hope so :-) )

Sure 😊

2. Won't it be possible to move the Option directly to the top? Reason: Most complains were about table views and now you have to do more clicks for switching if you just want to view a table on full width and then go back to "normal" mode.

Well, as @jancborchardt already said, this would be a bit too prominent. We try to not clutter the user interface with too many buttons and switches to not overwhelm users.

src/store/pages.js Outdated Show resolved Hide resolved
@mejo- mejo- requested a review from juliusknorr September 14, 2023 11:53
Also add same top and right margin to titlebar.

Signed-off-by: Jonas <[email protected]>
We might want to use this within Text later on, so let's already prefix
it with `text-` instead of `collectives-`.

Signed-off-by: Jonas <[email protected]>
@mejo- mejo- merged commit 3bb2e21 into main Sep 15, 2023
31 of 34 checks passed
@delete-merged-branch delete-merged-branch bot deleted the feat/full_width branch September 15, 2023 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Width of the Collectives app (white space between page content and page list)
8 participants